-- msg_sign_in_data
-- Create by panyl
-- 签到数据

return function(lpc)
    local signIn = lpc.sign_in

    local buf = Buffer.create(signIn)

    -- 前面32位记录的是最近一次签到时间
    local signInTime = Buffer.getu32(buf, 1)
    -- 后面32位记录的是月签到数据
    local signInDate = Buffer.getu32(buf, 5)
    
    local m = {}
    local day = 1
    while day < 32 do
        if signInDate % 2 == 1 then
            m[day] = 1
        end
        
        day = day + 1
        
        signInDate = math.modf(signInDate / 2)
    end

    -- 签到数据
    ME.user.signIn = {signInTime, m}
end
